

function addSensorbitCod(Blockly) {




    //有源蜂鸣器模块
   Blockly.Python.microbit_buzzer = function(block) {
    var dropdown_buzzer = this.getFieldValue('buzzer');
    var dropdown_buzzerStatus = this.getFieldValue('buzzerStatus');
    Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
    Blockly.Python.definitions_['import_Buzzer'] = 'from actuator import buzzer';
    var code = "buzzer.sing("+ dropdown_buzzer +", "+ dropdown_buzzerStatus +")\n";
    return code;
  }

    return Blockly;
}

module.exports = addSensorbitCod;

